/*

import java.util.Scanner;
public class test2 {
    public static void main(String[] args) {
        int[] brr = new int[20];
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();   //循环轮数
        int i = 0;
        for (int k = 1; k <= n; k++) {

            int a = sc.nextInt();     //每行个数
            int[] arr = new int[a];
            for (int h = 0; h < a; h++) {
                int count = 0;
                for (i = 0; i < a - 1; i++) {
                    for (int j = 0; j < a - 1 - i; j++) {
                        if (arr[j] > arr[j + 1]) {
                            int tem = arr[j];
                            arr[j] = arr[j + 1];
                            arr[j + 1] = tem;
                            count++;
                        }
                    }
                }
                //System.out.println();
                System.out.println(count);
                //brr[i]=count;
            }
        */
/*System.out.println("\t");;
        }for(i=1;i<=n;i++){
            System.out.println(brr[i])*//*

        }
    }
}*/
